<div class="row m-n">
	<div class="crumbs-bar">
		<div yb-crumbs></div>
	</div>
	<div tabset type="tab">
		<div tab heading="价格变动预警" active="activeFlag[0]" ng-click="changeTab(0)">
			<div class="row wrapper-y-sm">
				<div class="operate-bar col-xs-4 font-0">
					<button
						class="btn btn-operate m-r-sm"
						ng-disabled="!btnPermission.priceWarnEdit" title="{{!btnPermission.priceWarnEdit?'无权限执行此操作':''}}"
						ng-click="updatePricewarnBatch()">批量维护异常原因和编号</button>
					<button
						class="btn btn-operate m-r-sm"
						ng-disabled="!btnPermission.priceWarnAddDbd" title="{{!btnPermission.priceWarnAddDbd?'无权限执行此操作':''}}"
						ng-click="addPricewarn()">生成督办单</button>
				</div>
				<div class="search-bar wrapper-none col-xs-8">
					<div class="btn-group m-l-xs pull-right">
						<button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
							<i class="yb-icon ico-refresh"></i>
						</button>
						<button type="button" class="btn btn-default base-color" title="配置表格列"
							ng-click="switchToolbar('ColConfig');">
							<i class="yb-icon ico-set"></i>
						</button>
						<div class="btn btn-default base-color" ng-if="btnPermission.priceWarnExport">
							<div title="导出" yb-download download-url="exportParam.allUrl" download-param="condition" is-ajax="true">
								<i class="yb-icon ico-export-o"></i>
							</div>
						</div>
					</div>
					<button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
					<div class="input-group pull-right clearfix">
						<input type="text" class="form-control txt-search" placeholder="零件编号/零件中文名" ng-model="condition.keyWords">
						<span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
					</div>
				</div>
				<div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
					reset-data="reset()">
					<div class="advance-search m-t-sm">
						<div class="form-group clearfix">
							<label class="control-label"><span>零件编号</span>：</label>
							<textarea ng-model="condition.zhanwei" class="form-control" ng-blur="handleMultiInput($event)"
								placeholder="逗号分隔或者换行分隔"></textarea>
						</div>
						<div class="form-group clearfix">
							<label class="control-label"><span>单据状态</span>：</label>
							<select class="form-control" ng-model="condition.state">
								<option value="">请选择</option>
								<option value="0">未完成</option>
								<option value="1">已完成</option>
							</select>
						</div>
					</div>
				</div>
			</div>
			<div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="false"
				has-check-col="true"></div>
			<div class="main-area">
				<div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
					<div class="th-fixed">
						<table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
							<thead>
								<tr>
									<th width="40" class="text-center th-check border-l-none">
										<div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll(dataList)"></div>
									</th>
									<th ng-repeat="itemCol in tableConfig.tableCol track by $index"
										ng-show="!!itemCol.isShow && !!itemCol.isFixed" width="{{itemCol.width}}">
										<div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth"
											fixed-width="tbStyle.scrollLeft"></div>
									</th>
								</tr>
							</thead>
						</table>
					</div>
					<div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
						<table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
							<thead>
								<tr>
									<th ng-repeat="itemCol in tableConfig.tableCol track by $index"
										ng-show="!!itemCol.isShow && !itemCol.isFixed" width="{{itemCol.width}}">
										<div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth"></div>
									</th>
								</tr>
							</thead>
						</table>
					</div>
					<div class="td-scroll-y" ng-show="dataList.length > 0">
						<table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
							<tbody>
								<tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.curRow}"
									ng-click="selectRow($index)">
									<td width="40" class="text-center border-l-none">
										<div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item, dataList)"></div>
									</td>
									<td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
										width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
										title="{{item[itemCol.dataField]}}">
										<div>
											<button type="button" class="btn btn-operate m-r-xs"
												ng-disabled="!btnPermission.priceWarnEdit||item.state==1" title="{{!btnPermission.priceWarnEdit?'无权限执行此操作':''}}"
												ng-click="updatePricewarn(item)">编辑</button>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
						<table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
							<tbody>
								<tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.curRow}"
									ng-click="selectRow($index)">
									<td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
										width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}"
										ng-class="{'success-color':item.jackCon==2,'danger-color':item.jackCon==1}"
										ng-show="!!itemCol.isShow && !itemCol.isFixed">
										<div ng-switch="itemCol.type">
											<div ng-switch-when="click">
												<a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)">
													{{item[itemCol.dataField]}}
												</a>
											</div>
											<div ng-switch-default class="spill-dots">
												<span>{{item[itemCol.dataField]}}</span>
											</div>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>暂时没有数据</div>
				</div>
			</div>
			<div class="bottom-area page-bar wrapper-y-sm clearfix">
				<div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
			</div>
		</div>
		<div tab heading="价格变动图表" active="activeFlag[1]" ng-click="changeTab(1)">
			<div ng-if="activeFlag[1]">
				<form name="checkForm" class="m-t-lg form-horizontal form-up-tb clearfix">
					<div class="form-group col-xs-3 m-b-sm">
						<label class="col-xs-4 control-label max-w-100"><i>*</i><span translate>调整时间起始</span>：</label>
						<div class="col-xs-8 wrapper-none">
							<input type="text" class="form-control date-picker" name="adjustDateStart" required
								ng-model="echartsCondition.queryStartDate" datepicker-popup="{{'yyyy-MM-dd'}}" modal-size="small"
								is-open="adjustDateStartShow" close-text="关闭" readonly
								ng-change="checkDate(echartsCondition, 'queryStartDate', 'queryEndDate')"
								ng-click="adjustDateEndShow=false;adjustDateStartShow=!adjustDateStartShow">

							<div class="msg-block" ng-show="checkForm.adjustDateStart.$invalid && submitted">
								<div class="error-msg"
									ng-if="checkForm.adjustDateStart.$error.required && !checkForm.adjustDateStart.focused">
									<div class="msg-triangle"></div>
									<span translate>必填项，请填写</span>
								</div>
							</div>
						</div>
					</div>
					<div class="form-group col-xs-3 m-b-sm">
						<label class="col-xs-4 control-label max-w-100"><i>*</i><span translate>调整时间截止</span>：</label>
						<div class="col-xs-8 wrapper-none">
							<input type="text" class="form-control date-picker" name="adjustDateEnd" required
								ng-model="echartsCondition.queryEndDate" datepicker-popup="{{'yyyy-MM-dd'}}" modal-size="small"
								is-open="adjustDateEndShow" close-text="关闭" readonly
								ng-change="checkDate(echartsCondition, 'queryStartDate', 'queryEndDate')"
								ng-click="adjustDateStartShow=false;adjustDateEndShow=!adjustDateEndShow">

							<div class="msg-block"
								ng-show="checkForm.adjustDateEnd.$dirty || (checkForm.adjustDateEnd.$invalid && submitted)">
								<div class="error-msg"
									ng-if="checkForm.adjustDateEnd.$error.required && !checkForm.adjustDateEnd.focused">
									<div class="msg-triangle"></div>
									<span translate>必填项，请填写</span>
								</div>
							</div>
						</div>
					</div>
					<div class="form-group col-xs-3 m-b-sm">
						<span class="btn btn-primary searchBtn" ng-click="echartsSearch(checkForm.$valid)">搜索</span>
					</div>
				</form>
				<div yb-bar-chart class="chart-wrap m-t-lg" chart-axis="echartsOption" xaxis-title="调整时间" style="height:400px;"></div>
			</div>
		</div>
		<div tab heading="预警条件" active="activeFlag[4]" ng-click="changeTab(4)">
			<div class="p-t-md corr-tips">
				当对设置零件价格的进货基准价进行修改维护操作时，将业务数据自动生成到价格变更预警功能界面。
			</div>
		</div>
	</div>
</div>